﻿Imports Microsoft.TeamFoundation.Client
Imports Hinshelwood.TFSStickyBuddy.Modules.Interfaces
Imports Microsoft.Practices.Composite.Regions
Imports Microsoft.Practices.Composite.Events
Imports Microsoft.Practices.Unity
Imports Hinshelwood.TFSStickyBuddy.Modules.Model
Imports Microsoft.TeamFoundation.WorkItemTracking.Client

Namespace Services


    Public Class TeamServerService
        Implements ITeamServerService

        Private ReadOnly m_regionManager As IRegionManager
        Private ReadOnly m_eventAggregator As IEventAggregator
        Private ReadOnly m_container As IUnityContainer
        Private m_Connection As Project

        Public ReadOnly Property TfsConnection() As Project Implements Interfaces.ITeamServerService.TfsConnection
            Get
                Return m_Connection
            End Get
        End Property

        Public Sub New(ByVal regionManager As IRegionManager, ByVal container As IUnityContainer, ByVal eventAggregator As IEventAggregator)
            m_regionManager = regionManager
            m_eventAggregator = eventAggregator
            m_container = container
        End Sub

        Friend Sub ChangeConnection(ByVal TfsServer As Project) Implements Interfaces.ITeamServerService.ChangeConnection
            m_Connection = TfsServer
        End Sub

    End Class

End Namespace